package org.groupg.project.step;

public class Main {
    public static void main(String[] args) {
        // 构建链式调用：a.exe(b).and(c, d, f).exe(e)
        StepChain chain = new StepChain()
                .exe(new StepA())
                .exe(new StepB())
                .and(new StepC(), new StepD(), new StepF())  // 直接传入多个 Step
                .exe(new StepE());

        // 创建执行上下文
        StepContext context = new StepContext();
        context.setData("初始数据");

        // 启动引擎
        DisruptorFlowEngine engine = new DisruptorFlowEngine(chain.getNodes());
        engine.start(context);
        engine.shutdown();
    }
}